#ifndef __PORT_ALLOCATOR_H
#define __PORT_ALLOCATOR_H
#include "base/network.h"
#include <memory>
namespace xrtc
{

    class PortAllocator
    {

    public:
        PortAllocator();
        ~PortAllocator();
        const std::vector<Network *> &GetNetworks();
        void SetPortRange(int min_port, int max_port);
        int MinPort() { return min_port_; }
        int MaxPort() { return max_port_; }

    private:
        std::unique_ptr<NetworkManager> network_manager_;
        int min_port_ = 0;
        int max_port_ = 0;
    };

} // namespace xrtc

#endif